package com.zr.spring.jdbc;


import org.springframework.jdbc.core.RowMapper;
import java.sql.ResultSet;
import java.sql.SQLException;

public class PersonRowMapper implements RowMapper {


    @Override
    public Object mapRow(ResultSet set, int index) throws SQLException {
        Person person = new Person(set.getInt("id"), set.getString("user_name"), set.getInt("age"));
        return person;
    }
}